package com.kly.common;

import com.kly.model.domain.User;

/**
 * @author admin
 * @date 2025/2/24
 */
public class UserContext {
    private static final ThreadLocal<User> tl = new ThreadLocal<>();

    public static void setUser(User loginUser) {
        tl.set(loginUser);
    }

    public static User getUser() {
        return tl.get();
    }

    public static void removeUser() {
        tl.remove();
    }
}
